<!-- 页面底部的通用组件，参考元气卡详情、赛事详情，团课详情、训练营详情页面。提供三个slot： top-比如放置协议组件，left-左侧部分，right-右侧部分 -->

<template>
  <view class="sticky-footer">
    <!-- 协议 -->
    <slot name="top"></slot>
    <view class="sticky-footer-bottom">
      <view class="blur-background bottom-btn-bg"></view>
      <view class="blur-background bottom-btn-filter"></view>
      <view class="sticky-footer-inner">
        <view class="left">
          <slot name="left"></slot>
        </view>
        <view class="right">
          <slot name="right"></slot>
        </view>
      </view>
    </view>
  </view>
</template>

<script>
export default {};
</script>

<style lang="scss" scoped>
.sticky-footer {
  position: fixed;
  z-index: 2;
  left: 0;
  bottom: 0;
  width: 100%;

  &-bottom {
    position: relative;

    .bottom-btn-bg {
      position: absolute;
      top: 0;
      left: 0;
      width: 100vw;
      height: 100vh;
      z-index: -1;
    }
    .bottom-btn-fitler {
      position: absolute;
      top: 0;
      left: 0;
      width: 100vw;
      height: 100vh;
      -webkit-filter: blur(25rpx);
      filter: blur(25rpx);
      z-index: 1;
    }
  }

  &-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    // width: 100%; // 不能打开
    height: 115rpx;
    overflow: hidden;
    padding-left: 38rpx;
    padding-right: 38rpx;
    // box-sizing: border-box; // 不能设置
    z-index: 2;
    padding-bottom: constant(safe-area-inset-bottom);
    padding-bottom: env(safe-area-inset-bottom);
    background: rgba(255, 255, 255, 0.9);
    -webkit-backdrop-filter: brightness(100%) blur(50rpx);
    backdrop-filter: brightness(100%) blur(50rpx);
  }
}
</style>
